﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class shaiziMove : MonoBehaviour {
	public GameObject shaizi;
	// Use this for initialization
	void Start () {
		shaizi = this.gameObject;
	}
	
	// Update is called once per frame
	void Update () {
		
	}
	void FixedUpdate()
	{

		bool down = Input.GetKeyDown (KeyCode.Space);

		Vector3 randomfore = new Vector3 (Random.Range (-600, 600), 0, Random.Range (-600, 500));

		if (down) {
			shaizi.GetComponent<Rigidbody> ().AddForce (randomfore);
		}
	}
}

